function CompositeDecoder(encs,off) {

	var EMPTY = new function() {
		this.decode = function(t, o) {
			return null;
		}
		this.isDecodeable = function(t) {
			return false;
		}
	};
	
	this.encs = encs;
	this.pri; 
	this.sec;
	this.off = 0;
	
	if(off) {
		this.off = off;
	}

	this.pri = this.encs[this.off];

	if(this.off < this.encs.length-1)
		this.sec = new CompositeDecoder(this.encs,this.off+1);
	else
		this.sec = EMPTY;
		

	this.decode = function(t, o) {
		if(this.pri.isDecodeable(t))
			return this.pri.decode(t, o);
		else
			return this.sec.decode(t, o);
	}
	
	this.isDecodeable = function(t) {
		return this.pri.isDecodeable(t) || this.sec.isDecodeable(t);
	}	
}
